package com.cyan.app.workflow.activity.UserCenter;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.cyan.app.workflow.R;
import com.cyan.app.workflow.base.activity.BaseFragmentActivity;

/**
 * Created by DXW on 2016/2/27.
 */
public class UserCenterActivity extends BaseFragmentActivity {
    private View modifypwd;
    private View salary;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.user_settings);
        titleBar();
        //用户中心
        modifypwd = findViewById(R.id.user_settings_modifypwd);
        modifypwd.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent();
                intent.setClass(UserCenterActivity.this, MotifyPwdActivity.class);
                startActivity(intent);
            }
        });
        salary = findViewById(R.id.user_settings_salary);
        salary.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent();
                intent.setClass(UserCenterActivity.this, SalaryActivity.class);
                startActivity(intent);
            }
        });
    }

    private void titleBar() {
        TextView mTitleName = (TextView) findViewById(R.id.top_title_info);
        mTitleName.setText("用户中心");
        Button back = (Button) findViewById(R.id.top_title_back);
        back.getBackground().setAlpha(255);// 透明度0~255透明度值 ，值越小越透明
        back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //返回按钮
                finish();
            }
        });
    }
}
